#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main() {
    int h, m, s;
    scanf("%d", &s);
    h = s / 60 / 60;
    m = s / 60%60;
    s %= 60;
    printf("%d %d %d", h, m, s);
    return 0;
}